<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="UTF-8">
	<title>图书列表</title>
	<link rel="stylesheet" type="text/css"  href="dist/css/bootstrap.min.css" th:href="@{/dist/css/bootstrap.min.css}">
	<link rel="stylesheet" type="text/css" href="css/index.css" th:href="@{/css/index.css}" />
	<link rel="stylesheet" type="text/css" href="css/animate.css" th:href="@{/css/animate.css}" />
	
	</head>
	<body>
		<!--导航部分  begin-->
		<div th:replace="common/header :: header"></div>
		<!--导航部分 end-->

		<!--最顶端轮播图片 begin-->
		<div th:replace="common/carouse :: carouse"></div>
		<!--最顶端轮播图片 end-->
		<div class="container">	
			<ol class="breadcrumb">
			    <li><a href="#">图书列表</a></li>
			    <li><a href="#">精选图书</a></li>
			</ol>
		</div>
		<!--展示数据开始-->
		<div id="searchList"></div>
		<!--展示数据结束-->
		<!--地址-->
		<div class="container">
		<hr>
			<!--首页底部信息 begin-->
			<div th:replace="common/footer :: footer"></div>
		</div>
		<!--end-->
		<div th:replace="common/bookModal :: bookModal"></div>
		<script src="dist/js/jquery.min.js" th:src="@{/dist/js/jquery.min.js}"></script>
		<script src="js/carousel.js" th:src="@{/js/carousel.js}" type="text/javascript" charset="utf-8"></script>
		<script src="dist/js/bootstrap.min.js" th:src="@{/dist/js/bootstrap.min.js}"></script>
		<script src="js/wow.js" th:src="@{/js/wow.js}"></script>
		<script th:src="@{/js/login_reg.js}"></script>
		<script th:inline="javascript">
			//获取应用路径
			var contextPath = [[${#request.getContextPath()}]];
			var search = [[${search}]];
		</script>
		<script type="text/javascript">
			if(!(/msie [6|7|8|9]/i.test(navigator.userAgent))) {
				new WOW().init();
			};
			$(function () {
				$("#searchList").load(contextPath + "/book/getBookSearch", queryData(1, '', search));
			})
			function queryData(page,pageSize, search) {
				var query = {};
				query.search = search;
				query.page = page;
				query.pageSize = pageSize == '' ? 4 : pageSize;
				return query;
			}
			// function loadData(page, pageSize,search) {
			// 	$("#searchList").load(contextPath + "/book/getBookSearch", queryData(page,pageSize,search));
			// }
			// //跳转到指定页
			// function goPage(pageSize,search) {
			// 	var page = $("#inputPage").val();
			// 	$("#searchList").load(contextPath + "/book/getBookSearch",queryData(page,pageSize,search))
			// }
			//
			// //修改指定每页显示的记录数
			// function loadDataBySize(obj) {
			// 	$("#searchList").load(contextPath + "/book/getBookSearch",queryData(1,obj.value,search))
			// }
		</script>
	</body>
</html>
